package cn.kgc.itrip.biz.service.impl;

import cn.kgc.itrip.beans.pojo.ItripAreaDic;
import cn.kgc.itrip.biz.service.AreaDicService;
import cn.kgc.itrip.dao.itripareadic.ItripAreaDicMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class AreaDicServiceImpl implements AreaDicService {

    @Resource
    private ItripAreaDicMapper itripAreaDicMapper;

    @Override
    public List<ItripAreaDic> getHotCity(String isChina) throws Exception {
        Map<String, Object> params = new HashMap<>();
        // 查询热门城市
        // 1.确定国内还是国外
        params.put("isChina",isChina);
        // 2.确定是热门城市
        params.put("isHot",1);
        return itripAreaDicMapper.getItripAreaDicListByMap(params);
    }
}
